package com.xuecheng.learning.service;

import com.xuecheng.commons.model.dto.LearningProgressDto;
import com.xuecheng.commons.model.dto.RecordDto;
import com.xuecheng.commons.model.vo.CourseRecordVo;
import com.xuecheng.commons.model.vo.ResourceVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.learning.domain.CourseRecord;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 选课记录 服务类
 */
public interface CourseRecordService extends IService<CourseRecord> {
    //通过课程发布id查询用户的课程记录
    ResponseResult<CourseRecordVo> findRecordByPubId(Long coursePubId);
    //保存或更新选课记录
    ResponseResult saveRecord(RecordDto dto);
    //获取课程视频资源地址
    ResponseResult<ResourceVo> findPlayUrl(Long coursePubId, Long mediaId, Long teachplanId);
    //保存或更新学习进度
    ResponseResult progress(LearningProgressDto dto);
}
